﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using F_SER.DAL;
using F_SER.Module;

namespace F_SER
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“Service1”。
    [ServiceBehavior(IncludeExceptionDetailInFaults = true)]
    public class Service1 : IService1
    {
        public void f_right(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {       
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;
            
            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01;            l_info.value02 = a_data.VALUE02;            l_info.value03 = a_data.VALUE03;            l_info.value04 = a_data.VALUE04;            l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06;            l_info.value07 = a_data.VALUE07;            l_info.value08 = a_data.VALUE08;            l_info.value09 = a_data.VALUE09;            l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11;            l_info.value12 = a_data.VALUE12;            l_info.value13 = a_data.VALUE13;            l_info.value14 = a_data.VALUE14;            l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16;            l_info.value17 = a_data.VALUE17;            l_info.value18 = a_data.VALUE18;            l_info.value19 = a_data.VALUE19;            l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21;            l_info.value22 = a_data.VALUE22;            l_info.value23 = a_data.VALUE23;            l_info.value24 = a_data.VALUE24;            l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE", para);
                //ZZ00        --成功
                //总记录数    --用于分页查询， 对于单结果集，本字段没有意义， 总记录数记录在结果集的表1中
                //本次记录数  --客户端的大循环
                //字段数      --客户端的小循环

                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }                       
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////01//////////////////////////////////////////////////////////
        public void f_right01(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE01", para);       
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////02//////////////////////////////////////////////////////////
        public void f_right02(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE02", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////03//////////////////////////////////////////////////////////
        public void f_right03(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE03", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////04//////////////////////////////////////////////////////////
        public void f_right04(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE04", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////05//////////////////////////////////////////////////////////
        public void f_right05(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE05", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////06//////////////////////////////////////////////////////////
        public void f_right06(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE06", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////07//////////////////////////////////////////////////////////
        public void f_right07(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE07", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////08//////////////////////////////////////////////////////////
        public void f_right08(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE08", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////09//////////////////////////////////////////////////////////
        public void f_right09(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE09", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

        ///////////////10//////////////////////////////////////////////////////////
        public void f_right10(F_SER.Module.lc_data a_data, ref string a_out, ref string a_out2)
        {
            SysInfo l_info = new SysInfo();
            DataSet l_data = new DataSet();
            int li_row, li_col;

            l_info.CMD = a_data.CMD;
            l_info.value01 = a_data.VALUE01; l_info.value02 = a_data.VALUE02; l_info.value03 = a_data.VALUE03; l_info.value04 = a_data.VALUE04; l_info.value05 = a_data.VALUE05;
            l_info.value06 = a_data.VALUE06; l_info.value07 = a_data.VALUE07; l_info.value08 = a_data.VALUE08; l_info.value09 = a_data.VALUE09; l_info.value10 = a_data.VALUE10;
            l_info.value11 = a_data.VALUE11; l_info.value12 = a_data.VALUE12; l_info.value13 = a_data.VALUE13; l_info.value14 = a_data.VALUE14; l_info.value15 = a_data.VALUE15;
            l_info.value16 = a_data.VALUE16; l_info.value17 = a_data.VALUE17; l_info.value18 = a_data.VALUE18; l_info.value19 = a_data.VALUE19; l_info.value20 = a_data.VALUE20;
            l_info.value21 = a_data.VALUE21; l_info.value22 = a_data.VALUE22; l_info.value23 = a_data.VALUE23; l_info.value24 = a_data.VALUE24; l_info.value25 = a_data.VALUE25;

            string xml = CodeHelper.xml(l_info);
            try
            {
                SqlHelper sqlhelper = new SqlHelper();
                SqlParameter[] para = new SqlParameter[]
                    {
                        new SqlParameter("AS_IN", xml),
                        new SqlParameter("AS_OUT", SqlDbType.VarChar, 1024 ), //输出参数
                        new SqlParameter("AI_DO",  SqlDbType.Int), 
                    };
                para[0].Direction = ParameterDirection.Input;
                para[1].Direction = ParameterDirection.Output;
                para[2].Direction = ParameterDirection.Output;

                l_data = sqlhelper.RunProcDataSet("WP_SHINE10", para);
                a_out = "ZZ00|";
                if (l_data.Tables.Count > 0)
                {
                    //--如果大于0肯定有表1
                    li_row = l_data.Tables[0].Rows.Count;
                    li_col = l_data.Tables[0].Columns.Count;
                    a_out = a_out + li_row.ToString() + "|" + li_col.ToString() + "|";

                    for (int i = 0; i < li_row; i++)
                    {
                        for (int j = 0; j < li_col; j++)
                        {
                            a_out = a_out + l_data.Tables[0].Rows[i][j].ToString() + "#";
                        }
                        a_out = a_out + "|";
                    }

                    //--有表2的情况
                    if (l_data.Tables.Count == 2)
                    {
                        a_out2 = "ZZ00|";
                        li_row = l_data.Tables[1].Rows.Count;
                        li_col = l_data.Tables[1].Columns.Count;
                        a_out2 = a_out2 + li_row.ToString() + "|" + li_col.ToString() + "|";

                        for (int i = 0; i < li_row; i++)
                        {
                            for (int j = 0; j < li_col; j++)
                            {
                                a_out2 = a_out2 + l_data.Tables[1].Rows[i][j].ToString() + "#";
                            }
                            a_out2 = a_out2 + "|";
                        }
                    }
                }
            }
            catch (Exception e)
            {
                a_out = "ZZ01|" + e.Message + "|";
            }
        }

    }
}
